package br.ufrn.engcomp.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import br.ufrn.engcomp.arq.GenericDAO;
import br.ufrn.engcomp.arq.PersistDB;

@Service(value = "serviceCadastro")
public class ServiceCadastro {

    @Autowired
    @Qualifier("genericDAOHibernate")
    private GenericDAO dao;

    @Transactional(readOnly = false)
    public void save(PersistDB object) {
	dao.save(object);
    }

    @Transactional(readOnly = false)
    public void update(PersistDB object) {
	dao.update(object);
    }

    @Transactional(readOnly = false)
    public void delete(PersistDB object) {
	dao.delete(object);
    }

}
